//
//  ViewController.m
//  DrawCurveDemo
//
//  Created by yan on 16/9/10.
//  Copyright © 2016年 胡岩. All rights reserved.
//

#import "ViewController.h"
#import "YCurveView.h"

@interface ViewController ()

@property (nonatomic, strong) YCurveView *curveView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor whiteColor];
    self.curveView = [[YCurveView alloc] init];
    self.curveView.frame = self.view.bounds;
    self.curveView.lineWidth = 2.0;
    self.curveView.points = @[[NSValue valueWithCGPoint:CGPointMake(10, 200)], [NSValue valueWithCGPoint:CGPointMake(50, 300)], [NSValue valueWithCGPoint:CGPointMake(130, 200)], [NSValue valueWithCGPoint:CGPointMake(200, 180)], [NSValue valueWithCGPoint:CGPointMake(250, 250)], [NSValue valueWithCGPoint:CGPointMake(300, 250)]];
    [self.view addSubview:self.curveView];
//    self.curveView.type = YCurveViewTypeBrokenLine;
//    self.curveView.bottomMaskColor = [UIColor orangeColor];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
